package com.situ.day12lianxi2;

public class AccountAdmin {
	private Double balance;

	public AccountAdmin() {
		this.balance = 0.0;
	}
	//存钱
	public void cunQian(double amount) {
		balance += amount;
	}
	//取钱
	public void quQian(double amount) throws MeiQianException {
		if (amount <= balance) {
			balance -= amount;
		}else {
			double need = amount - balance;
			throw new MeiQianException(need);
		}
		
	}

}
